# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=tell-me-your-secrets
pkgver=v2.4.2.r3.g5434b9d
_pyver=3.13
pkgrel=5
epoch=1
pkgdesc='Find secrets on any machine from over 120 Different Signatures.'
arch=('any')
groups=('blackarch' 'blackarch-code-audit' 'blackarch-forensic')
url='https://github.com/valayDave/tell-me-your-secrets'
license=('MIT')
depends=('python' 'python-gitignore-parser' 'python-pandas' 'python-yaml')
makedepends=('git' 'python-pip' 'python-build' 'python-wheel')
source=("git+https://github.com/valayDave/$pkgname.git")
sha512sums=('SKIP')

pkgver() {
  cd $pkgname

  git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
}

build() {
  cd $pkgname

  python -m build --wheel --outdir="$startdir/dist"
}

package() {
  cd $pkgname

  pip install \
    --verbose \
    --disable-pip-version-check \
    --no-warn-script-location \
    --ignore-installed \
    --no-compile \
    --no-deps \
    --root="$pkgdir" \
    --prefix=/usr \
    --no-index \
    --find-links="file://$startdir/dist" \
    $pkgname

	install -Dm 644 LICENSE.txt "$pkgdir/usr/share/licenses/$pkgname/LICENSE"

  rm -rf "$pkgdir/usr/lib/python$_pyver/site-packages/test"
}

